import axios from '@/utils/request';
const baseOriginURL = process.env.VUE_APP_BASE_ORIGIN + '/iot_common';

// 获取消息类型及数量
const getMessageStatus = () => {
  return axios.get(baseOriginURL + '/message/message_status');
};

// 提交反馈建议
const submitFeedBack = data => {
  return axios.post(baseOriginURL + '/feedback/submitFeedBack', data);
};

// 上传文件
const uploadFile = data => {
  return axios.request({
    method: 'POST',
    url: baseOriginURL + '/uploadFile',
    data,
    headers: {
      'Content-Type': 'multipart/form-data'
    }
  });
};

// 获取公司列表
const getCustomerList = params => {
  return axios.get(baseOriginURL + '/message/getCustomerList', {
    params
  });
};

export { getMessageStatus, submitFeedBack, uploadFile, getCustomerList };
